(include "sci.sh")
(use "Main")
(use "Class_255_0")
(use "Cycle")
(use "Game")
(use "PV")
(use "Obj")
(script 507)


(local
    local0

)
(instance public {Woods Region} of Rgn
    (properties)

    (method (init)
        (if (== Random(1 5) 4)
            = gNewAct (Act:new())
            (send gNewAct:
                view(356)
                ignoreHorizon()
                illegalBits(0)
                ignoreActors()
                setPri(14)
                setScript(ravenActions)
            )
            (if (== Random(1 2) 1)
                (send gNewAct:
                    posn(5 30)
                    xStep(5)
                    yStep(4)
                    setCycle(Fwd)
                    setMotion(MoveTo 339 20 gNewAct)
                    init()
                )
            )(else
                (send gNewAct:
                    posn(314 20)
                    xStep(5)
                    yStep(4)
                    setCycle(Fwd)
                    setMotion(MoveTo 65516 40 gNewAct)
                    init()
                )
            )
        )
        (super:init())
    )


    (method (handleEvent pEvent)
        (if ((send pEvent:claimed()))
            return 1
        )
        return 
            (if (== (send pEvent:type()) 128)
                (if (Said('look>'))
                    (if (Said('/boulder'))
                        Print(507 0)
                    )(else
                        (if (Said('/flora'))
                            Print(507 1)
                        )(else
                            (if (Said('/dirt,down'))
                                Print(507 2)
                            )(else
                                (if (Said('/bush'))
                                    Print(507 3)
                                )(else
                                    (if (Said('/grass'))
                                        Print(507 4)
                                    )(else
                                        (if (Said('/blossom'))
                                            Print(507 5)
                                        )(else
                                            (if (Said('/forest'))
                                                Print(507 6)
                                            )(else
                                                (if (Said('/crow,bird,crow'))
                                                    (if ((send gCast:contains(gNewAct)))
                                                        Print(507 7)
                                                    )(else
                                                        Print(507 8)
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )(else
                    (if (Said('climb/boulder'))
                        Print(507 9)
                    )(else
                        (if (Said('get/blossom'))
                            Print(507 10)
                        )(else
                            (if (Said('climb/forest'))
                                Print(507 11)
                            )(else
                                (if (Said('converse/crow,bird,crow'))
                                    (if ((send gCast:contains(gNewAct)))
                                        Print(507 12)
                                    )(else
                                        Print(507 13)
                                    )
                                )(else
                                    (if (Said('get,capture/crow,bird,crow'))
                                        (if ((send gCast:contains(gNewAct)))
                                            Print(507 14)
                                        )(else
                                            Print(507 15)
                                        )
                                    )(else
                                        (if (Said('kiss/crow,bird,crow'))
                                            (if ((send gCast:contains(gNewAct)))
                                                Print(507 16)
                                            )(else
                                                Print(507 15)
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )(else
                0
            )
    )

)
(instance ravenActions of Script
    (properties)

    (method (cue)
        (send gNewAct:dispose())
    )

)
